<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head th:replace="common/form :: head"></head>
	
	<body class="mainbody">
		<form method="POST" th:object="${obj}" enctype="multipart/form-data">
			<div th:replace="common/form :: location('企业管理',*{id} gt 0 ?'修改企业信息':'新增企业')"></div>
			<div id="floatHead" class="content-tab-wrap">
			  <div class="content-tab">
			    <div class="content-tab-ul-wrap">
			      <ul>
			        <li><a href="javascript:;">企业信息</a></li>
			      </ul>
			    </div>
			  </div>
			</div>
			<div class="tab-content">
				<dl>
				
					<dt>企业编号</dt>
				    <dd>
				      <input type="text" th:field="*{no}" class="input normal" data-type="*4-100"/>
				      <span class="Validform_checktip">*请输入企业编号</span>
				    </dd>
				</dl>
				<dl>
					<dt>企业名称</dt>
				    <dd>
				      <input type="text" th:field="*{name}" class="input normal" data-type="*2-100" />
				      <span class="Validform_checktip">*请输入企业名称</span>
				    </dd>
				</dl>
		
				<dl>
					<dt>企业类型</dt>
				    <dd>
				      <input type="text" th:field="*{type}" data-type="*2-10" class="input normal" />
				      <span class="Validform_checktip">*请填写企业类型</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>企业电话</dt>
				    <dd>
				      <input type="text" th:field="*{tel}" data-type="*7-11" class="input normal" />
				      <span class="Validform_checktip">*请填写企业电话</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>企业地址</dt>
				    <dd>
				      <input type="text" th:field="*{address}" data-type="*1-500" class="input normal" />
				      <span class="Validform_checktip">*请填写企业地址</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>备注信息</dt>
					<dd>
						<textarea class="input normal" maxlength="50" rows="5" th:field="*{describer}"></textarea>
						<span class="Validform_checktip"></span>
					</dd>
				</dl>
				
				
				<dl>
				 	<dt>企业Logo</dt>
					<dd>
						<input type="file" name="PICN" onchange="previewFile()"/><br/>
						<img th:src="${pro}+*{photo}" height="250px" width="10px" alt="Image preview..." class="input normal"/>
						 <span class="Validform_checktip">*请选择企业Logo</span>
							<!-- <img  th:src="${pro}+*{photo}" style="position:absolute;left:250px;top:190px" width="120px" height="70px"/> -->
					</dd>
			   </dl>
				
				
				
				
				<!--  <dl>
					<dt>企业Logo</dt>
					<dd>
						<input type="file" name="PICN" />
					</dd>
					<img th:src="*{photo}" style="position:absolute left:560px top:340px" width="100px" height="60px" />
					<img th:src="*{photo}" style="position:absolute;left:360px;top:360px" width="100px" height="60px"/>
					<img th:src="${pro}+*{photo}" style="position:absolute;left:360px;top:360px" width="90px" height="65px"/>
				</dl>  -->
				
			</div>
			<div th:replace="common/form :: footer"></div>
		</form>

		<script type="text/javascript" th:replace="common/form :: formscript">
		</script>
		<script type="text/javascript">
		//图片预览
		function previewFile() {
			 var preview = document.querySelector('img');
			 var file  = document.querySelector('input[type=file]').files[0];
			 var reader = new FileReader();
			 reader.onloadend = function () {
			  preview.src = reader.result;
			 }
			 if (file) {
			  reader.readAsDataURL(file);
			 } else {
			  preview.src = "";
			 }
		}
		
		</script>
	</body>
</html>